package com.bbcare.comm;

/**
 * @name: 错误码定义类
 * @author: DemonLee
 * @createTime: 2017.4.28
 * @description: 错误码定义规则：
 *
 *               应用编号 + 功能域 + 错误编号
 *
 *               如：
 *
 *               应用编号：在线医疗服务基础平台 101
 *
 *               功能域：患者相关 201
 *
 *               错误编码：账号不存在 0001
 *
 *               账号不存在 = 1012010001
 * @modify:
 *
 */
public class ErrorCode {
    // 应用编码基数
    private static final long appBasic = 10000000;
    // 功能域基数
    private static final long funcBasic = 10000;

    // 计算错误码
    static String assembleErrCode(long appCode, long funCode, long errCode) {
        return "" + (appCode * appBasic + funCode * funcBasic + errCode);
    }

    // -----------------随访系统 Begin-----------------//
    // 应用编号：201
    private static final long fuAppCode = 201;
    // 公共错误域：200
    private static final long fuPubFuncCode = 200;
    // 患者域：201
    private static final long fuPatientFuncCode = 201;
    // 方案域：202
    private static final long fuSchemeFuncCode = 202;
    // 队列域：203
    private static final long fuQueueFuncCode = 203;
    // 任务域：204
    private static final long fuTaskFuncCode = 204;
    // 问卷域：205
    private static final long fuQuestionFuncCode = 205;
    // redis域：206
    private static final long fuRedisFuncCode = 206;
    // 静态配置数据域：207
    private static final long fuStaticFuncCode = 207;
    // 数据监控
    private static final long fuMonitorFuncCode = 208;

    // 营养方案应用
    private static final long fuNtSchemeUsedFuncCode = 209;
    //
    //
    // -----------------影像管理 Begin-----------------//
    // 影像应用
    private static final long imgCollectionAppCode = 400;
    // 影像设备域
    private static final long imgEquipFuncCode = 401;

    // -----------------扫码建档Begin-----------------//
    // 扫码应用
    private static final long fuScanAppCode = 500;
    // 影像设备域
    private static final long fuScanFuncCode = 501;

    // 公共域错误
    /**
     * 入参格式错误，如非json格式，Integer传String等
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_INPUT_DATA_FORMAT_ERROR = assembleErrCode(fuAppCode,
            fuPubFuncCode, 1);
    /**
     * 入参数据校验失败，如参数未传、值为空等
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_INPUT_DATA_VERIFY_ERROR = assembleErrCode(fuAppCode,
            fuPubFuncCode, 2);

    /**
     * 图片上传失败，上传文件为空
     */
    public static final String FOLLOW_EXCEPTION_TYPE_UPLOAD_FILE_MPTY = assembleErrCode(fuAppCode, fuPubFuncCode, 3);
    /**
     * 日期时间格式解析错误
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_DATE_PARSE_ERROR = assembleErrCode(fuAppCode, fuPubFuncCode, 4);
    /**
     * session为空
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_SESSION_ISNULL = assembleErrCode(fuAppCode, fuPubFuncCode, 5);
    /**
     * session值为空
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_SESSION_VALUEISNULL = assembleErrCode(fuAppCode, fuPubFuncCode,
            6);
    /**
     * 出生日期大于当前时间
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_BIRTHDAY_EXPEND_NOW = assembleErrCode(fuAppCode, fuPubFuncCode,
            7);
    /**
     * 租户类型未定义
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_TENANT_TYPE_UNKNOWN = assembleErrCode(fuAppCode, fuPubFuncCode,
            8);
    /**
     * 公共校验 app端接入 没有传入渠道id
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_INPUT_CHANNEL_IS_NULL = assembleErrCode(fuAppCode, fuPubFuncCode,
            9);
    /**
     * 调用外部接口服务异常
     */
    public static final String EXCEPTION_TYPE_SYSTEM_SERVICE_CALL_EXCP = assembleErrCode(fuAppCode, fuPubFuncCode, 10);

    /**
     * 调用外部短信接口服务异常
     */
    public static final String EXCEPTION_TYPE_SYSTEM_OUTSMS_SERVICE_CALL_EXCP = assembleErrCode(fuAppCode,
            fuPubFuncCode, 11);

    public static final String EXCEPTION_WECHATID_NOT_BIND_PHONENUM = assembleErrCode(fuAppCode, fuPubFuncCode, 12);

    public static final String EXCEPTION_WECHAT_COUNT_NOT_EXIST = assembleErrCode(fuAppCode, fuPubFuncCode, 13);

    public static final String EXCEPTION_WECHAT_SYSTEM_ERROR = assembleErrCode(fuAppCode, fuPubFuncCode, 14);

    /**
     * 消息体为空
     */
    public static final String EXCEPTION_INNER_ASYNCH_MSG_BODY_ISNULL = assembleErrCode(fuAppCode, fuPubFuncCode, 15);

    /**
     * 消息类型未定义
     */
    public static final String EXCEPTION_INNER_ASYNCH_MSG_TYPE_UNDEFINED = assembleErrCode(fuAppCode, fuPubFuncCode,
            16);

    /**
     * 消息处理未知异常
     */
    public static final String EXCEPTION_INNER_ASYNCH_MSG_DEAL_UNKNOWN = assembleErrCode(fuAppCode, fuPubFuncCode, 17);

    /**
     * csb接口调用异常
     */
    public static final String EXCEPTION_CSB_SERVICE_CALL = assembleErrCode(fuAppCode, fuPubFuncCode, 18);

    /**
     * csb api_name 不存在
     */
    public static final String EXCEPTION_CSB_API_NAME_NOT_EXIST = assembleErrCode(fuAppCode, fuPubFuncCode, 19);

    /**
     * 消息体格式错误
     */
    public static final String EXCEPTION_INNER_ASYNCH_MSG_BODY_FORMAT_ERROR = assembleErrCode(fuAppCode, fuPubFuncCode,
            20);

    /**
     * 同步接口服务类型未定义
     */
    public static final String EXCEPTION_ASYNCH_SERVICE_TYPE_UNDEFINED = assembleErrCode(fuAppCode, fuPubFuncCode,
            21);

    // 获取带签名的访问地址失败
    public static final String IMG_EXCEPTION_GET_SIGN_URL = assembleErrCode(imgCollectionAppCode, imgEquipFuncCode, 1);

    // 申请账号接口一定时间段内 请求次数
    public static final String EXCEPTION_SYS_IP_LIMIT_TIMES = assembleErrCode(imgCollectionAppCode, imgEquipFuncCode, 1);

    // 患者域错误
    /**
     * 查询患者记录不存在
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_PATIENT_NOT_EXIST = assembleErrCode(fuAppCode, fuPatientFuncCode,
            1);
    /**
     * 查询患者任务记录不存在
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_PATIENT_TASK_NOT_EXIST = assembleErrCode(fuAppCode,
            fuPatientFuncCode, 2);
    /**
     * 查询患者队列实例表记录不存在
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_PATIENT_QUEUE_NOT_EXIST = assembleErrCode(fuAppCode,
            fuPatientFuncCode, 3);
    /**
     * 患者已经加入该队列，禁止重复加入
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_PATIENT_QUEUE_ALREADY_EXIST = assembleErrCode(fuAppCode,
            fuPatientFuncCode, 4);
    /**
     * 患者在该队列中状态为暂停
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_PATIENT_QUEUE_STATUS_SUSPEND = assembleErrCode(fuAppCode,
            fuPatientFuncCode, 5);

    /**
     * 患者在队列中状态非暂停
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_PATIENT_QUEUE_STATUS_NOT_SUSPEND = assembleErrCode(fuAppCode,
            fuPatientFuncCode, 6);

    /**
     * 患者在队列中状态不正常
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_PATIENT_QUEUE_STATUS_NOT_NORMAL = assembleErrCode(fuAppCode,
            fuPatientFuncCode, 7);

    /**
     * 患者在该队列中状态为待审核
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_PATIENT_QUEUE_STATUS_AUDIT = assembleErrCode(fuAppCode,
            fuPatientFuncCode, 8);
    /**
     * 患者任务状态非初始化状态
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_PATIENT_TASKSTATUS_NOT_INIT = assembleErrCode(fuAppCode,
            fuPatientFuncCode, 9);

    /**
     * 生长发育标准数据不存在
     */
    public static final String FOLLOWUP_EXCEPTION_GROWTHS_STANDARD_WHO_NOT_EXIST = assembleErrCode(fuAppCode,
            fuPatientFuncCode, 10);

    /**
     * 患者创建消息同步 app服务端
     */
    public static final String FOLLOWUP_EXCEPTION_PATIENT_SYN_ERROR = assembleErrCode(fuAppCode, fuPatientFuncCode, 11);

    /**
     * 查询患者任务失访记录已经存在
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_PATIENT_LOSTRD_ALREADY_EXIST = assembleErrCode(fuAppCode,
            fuPatientFuncCode, 12);

    /**
     * 患者当前周期内随访短信已发送
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_PATIENT_SFTXDX_HAS_SENT = assembleErrCode(fuAppCode,
            fuPatientFuncCode, 13);

    /**
     * 患者当前窗口期内随访短信最大发送次数
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_PATIENT_SFTXDX_LIMITNUM = assembleErrCode(fuAppCode,
            fuPatientFuncCode, 14);

    /**
     * 年龄超过生长发育测试标准年龄
     */
    public static final String FOLLOWUP_EXCEPTION_GROWTHS_STANDARD_WHO_AGE_OVER_MAXAGE = assembleErrCode(fuAppCode,
            fuPatientFuncCode, 15);

    /**
     * 患者在队列中状态已删除
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_PATIENT_QUEUE_STATUS_HAS_REMOVED = assembleErrCode(fuAppCode,
            fuPatientFuncCode, 16);

    /**
     * 患者无法添加新的临时任务
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_PATIENT_CANNOT_ADD_TEMP_TASK = assembleErrCode(fuAppCode,
            fuPatientFuncCode, 17);

    /**
     * 患者操作记录不存在
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_PATIENT_IAOPR_RECORD_NOT_EXISTS = assembleErrCode(fuAppCode,
            fuPatientFuncCode, 18);

    /**
     * FENTON标准数据不存在
     */
    public static final String FOLLOWUP_EXCEPTION_GROWTHS_STANDARD_FENTON_NOT_EXIST = assembleErrCode(fuAppCode,
            fuPatientFuncCode, 20);
    /**
     * 用户生日不存在
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_PATIENT_BIRTHDAY_NOT_EXIST = assembleErrCode(fuAppCode,
            fuPatientFuncCode, 21);
    /**
     * 患者已经随访过
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_PATIENT_HAS_OUTPATIENT = assembleErrCode(fuAppCode,
            fuPatientFuncCode, 22);

    /**
     * 年龄不在次范围
     */
    public static final String FOLLOWUP_EXCEPTION_AGE_OUT_RANGE = assembleErrCode(fuAppCode, fuPatientFuncCode, 23);

    /**
     * 医生已审核确认的随访内容，患者端无法修改
     */
    public static final String FOLLOWUP_EXCEPTION_PT_SACN_SYNC_DATA_FOR_AUDITED = assembleErrCode(fuAppCode,
            fuPatientFuncCode, 24);

    // 方案域错误
    /**
     * 配置表方案记录不存在
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_SCHEME_NOT_EXIST = assembleErrCode(fuAppCode, fuSchemeFuncCode,
            1);
    /**
     * 配置表方案名称已经存在，不能重复创建
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_SCHEME_NAME_ALREADY_EXIST = assembleErrCode(fuAppCode,
            fuSchemeFuncCode, 2);
    /**
     * 配置表方案已经运用到队列中
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_SCHEME_ALREADY_USED = assembleErrCode(fuAppCode,
            fuSchemeFuncCode, 3);
    /**
     * 配置表方案记录不存在
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_SCHEMEVERSION_NOT_EXIST = assembleErrCode(fuAppCode,
            fuSchemeFuncCode, 4);
    /**
     * 配置表方案下任务记录不存在
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_SCHEME_TASK_NOT_EXIST = assembleErrCode(fuAppCode,
            fuSchemeFuncCode, 5);
    /**
     * 配置表方案状态为已删除
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_SCHEME_ALREADY_DELETE = assembleErrCode(fuAppCode,
            fuSchemeFuncCode, 6);
    /**
     * 配置表方案状态为非定义
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_SCHEME_STATUS_UNKNOWN = assembleErrCode(fuAppCode,
            fuSchemeFuncCode, 7);
    /**
     * 配置表方案状态不合理
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_SCHEME_STATUS_IRREGULAR = assembleErrCode(fuAppCode,
            fuSchemeFuncCode, 8);
    /**
     * 任务下内容模板已经存在
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_SCHEME_TASKCONT_TEMPL_ALREADY_EXIST = assembleErrCode(fuAppCode,
            fuSchemeFuncCode, 9);
    /**
     * 任务下内容模板已经存在
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_QUEUE_SCHEME_BUSITYPE_INCOMPATIBLE = assembleErrCode(fuAppCode,
            fuSchemeFuncCode, 10);

    // 队列域错误
    /**
     * 配置表队列记录不存在
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_QUEUE_NOT_EXIST = assembleErrCode(fuAppCode, fuQueueFuncCode, 1);
    /**
     * 队列状态不正常
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_QUEUE_STATUS_IRREGULAR = assembleErrCode(fuAppCode,
            fuQueueFuncCode, 2);

    /**
     * 队列有正在管理的患者
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_QUEUE_HAVE_MANAGERPATIENTS = assembleErrCode(fuAppCode,
            fuQueueFuncCode, 3);

    /**
     * 当前医生不是管理员 不能转移管理员
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_QUEUE_NOT_MANAGERDOCTOR = assembleErrCode(fuAppCode,
            fuQueueFuncCode, 4);

    /**
     * 该用户无可查看队列信息
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_HAS_NO_QUEUE_AUTHORITY = assembleErrCode(fuAppCode,
            fuQueueFuncCode, 5);

    /**
     * 队列目标人数配置错误
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_QUEUE_TARGETNUM_CONFIG_ERROR = assembleErrCode(fuAppCode,
            fuQueueFuncCode, 6);

    /**
     * 队列当前人数已达到目标人数上限，无法继续添加新患者
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_QUEUE_TARGETNUM_LIMIT = assembleErrCode(fuAppCode,
            fuQueueFuncCode, 7);

    /**
     * 该科室没有配置默认队列
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_DEPARTMENT_DEFAULT_QUEUE_NOT_EXIST = assembleErrCode(fuAppCode,
            fuQueueFuncCode, 8);

    /**
     * 队列对应科室id未配置
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_QUEUE_FOR_DEPT_NOT_EXIST = assembleErrCode(fuAppCode,
            fuQueueFuncCode, 9);

    /**
     * 队列对应租户id未配置
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_QUEUE_FOR_TENANT_NOT_EXIST = assembleErrCode(fuAppCode,
            fuQueueFuncCode, 11);

    /**
     * 队列下未配置方案
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_QUEUE_SCHEMEID_NOT_EXIST = assembleErrCode(fuAppCode,
            fuQueueFuncCode, 12);

    /**
     * 队列下未配置建档任务内容
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_QUEUE_SCHEMEID_ARCHIVE_TASKCONT_NOT_EXIST = assembleErrCode(
            fuAppCode, fuQueueFuncCode, 13);

    /**
     * 队列下未配置建档任务id
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_QUEUE_SCHEMEID_ARCHIVE_TASK_NOT_EXIST = assembleErrCode(
            fuAppCode, fuQueueFuncCode, 14);

    /**
     * 加入不在当前租户系统下的随访队列
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_QUEUE_JOIN_NON_CURR_TENANT = assembleErrCode(fuAppCode,
            fuQueueFuncCode, 15);

    // 任务域错误
    /**
     * 配置表任务记录不存在
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_TASK_NOT_EXIST = assembleErrCode(fuAppCode, fuTaskFuncCode, 1);
    /**
     * 任务内容记录不存在
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_TASKCONTENT_NOT_EXIST = assembleErrCode(fuAppCode,
            fuTaskFuncCode, 2);
    /**
     * 任务触发方式未定义
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_TASKEXECUTETYPE_UNKNOWN = assembleErrCode(fuAppCode,
            fuTaskFuncCode, 3);
    /**
     * 任务按出院后触发，需要填写出院日期
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_TASKEXECUTETYPE_OUTHOSPITAL_PARAM = assembleErrCode(fuAppCode,
            fuTaskFuncCode, 4);

    // 问卷域错误
    /**
     * 问卷模板记录不存在
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_QUES_TEMPL_NOT_EXIST = assembleErrCode(fuAppCode,
            fuQuestionFuncCode, 1);
    /**
     * 问卷模板版本记录不存在
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_QUES_TEMPLVERSION_NOT_EXIST = assembleErrCode(fuAppCode,
            fuQuestionFuncCode, 2);
    /**
     * 问卷模板内容为空
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_QUES_TEMPLDATA_IS_NULL = assembleErrCode(fuAppCode,
            fuQuestionFuncCode, 3);
    /**
     * 问卷模板内容json格式配置问题
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_QUES_TEMPLDATA_CONFIG_IRREGULAR = assembleErrCode(fuAppCode,
            fuQuestionFuncCode, 4);

    // redis域错误
    /**
     * redis连接异常
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_REDIS_CONNECT_ERROR = assembleErrCode(fuAppCode, fuRedisFuncCode,
            1);
    /**
     * redis连接关闭异常
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_REDIS_CONNECT_CLOSE_FAILED = assembleErrCode(fuAppCode,
            fuRedisFuncCode, 2);

    // 静态配置数据域错误
    /**
     * 操作编码记录未配置
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_STATIC_OPCODE_NOT_EXIST = assembleErrCode(fuAppCode,
            fuStaticFuncCode, 1);
    /**
     * 随访提醒规则未配置
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_TASK_INFORMRULE_NOT_EXIST = assembleErrCode(fuAppCode,
            fuStaticFuncCode, 2);
    /**
     * 随访提醒类型未定义
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_TASK_INFORMRULETYPE_UNKNOWN = assembleErrCode(fuAppCode,
            fuStaticFuncCode, 3);
    /**
     * 短信模板未配置
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_SMS_TEMPL_NOT_EXIST = assembleErrCode(fuAppCode,
            fuStaticFuncCode, 4);
    /**
     * 短信模板内容为空
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_SMS_TEMPL_CONTENT_ISNULL = assembleErrCode(fuAppCode,
            fuStaticFuncCode, 5);
    /**
     * 服务接口配置表未配置
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_SERVICEDICT_IS_NOT_EXIST = assembleErrCode(fuAppCode,
            fuStaticFuncCode, 6);
    /**
     * 静态配置表记录不存在
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_STATIC_CONFIG_NOT_EXIST = assembleErrCode(fuAppCode,
            fuStaticFuncCode, 7);
    /**
     * 不在发送范围内
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_NOT_IN_TIME_RANGE = assembleErrCode(fuAppCode, fuStaticFuncCode,
            8);
    /**
     * （基因）项目已存在
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_CONTENTCONFIG_ALREADY_EXIST = assembleErrCode(fuAppCode,
            fuStaticFuncCode, 9);
    /**
     * （基因）项目不存在
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_CONTENTCONFIG_NOT_EXIST = assembleErrCode(fuAppCode,
            fuStaticFuncCode, 10);
    /**
     * （基因）项目已被删除
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_CONTENTCONFIG_WAS_REMOVED = assembleErrCode(fuAppCode,
            fuStaticFuncCode, 11);

    /**
     * 窗口期最后一天==当天
     */
    public static final String FOLLOWUP_EXCEPTION_WIN_ENDDATE_EQUAL_NOW = assembleErrCode(fuAppCode, fuStaticFuncCode,
            12);

    // 数据监测
    /**
     * 氧饱脉率记录不存在
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_PULSERATE_NOT_EXIST = assembleErrCode(fuAppCode,
            fuMonitorFuncCode, 1);

    /**
     * 体温记录不存在
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_TEMPERATURE_NOT_EXIST = assembleErrCode(fuAppCode,
            fuMonitorFuncCode, 2);

    /**
     * 生长发育记录不存在
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_GROWTH_NOT_EXIST = assembleErrCode(fuAppCode, fuMonitorFuncCode,
            3);

    /**
     * 随访评估记录不存在
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_EVALUATION_NOT_EXIST = assembleErrCode(fuAppCode,
            fuMonitorFuncCode, 4);

    /**
     * 年龄不在评测范围内
     */
    public static final String FOLLOWUP_EXCEPTION_TYPE_EVALUATION_AGE_OUTRANGE = assembleErrCode(fuAppCode,
            fuMonitorFuncCode, 5);

    /**
     * 无效二维码
     */
    public static final String FOLLOWUP_EXCEPTION_QRCODE_INVALID = assembleErrCode(fuAppCode, fuMonitorFuncCode, 6);

    // -----------------随访系统 End-----------------//

    // -----------------科室管理 Begin-----------------//
    // 科室资料管理
    private static final long fuDepartmemtFuncCode = 301;
    // 医生管理
    private static final long fuDoctorFuncCode = 302;
    // 宣教管理
    private static final long fuEducationFuncCode = 303;

    // 随访门诊排班
    /**
     * 重复排班
     */
    public static final String DEPARTMENT_EXCEPTION_TYPE_DUPLICATE_OUTPATIENT_SCHEDULE = assembleErrCode(fuAppCode,
            fuDepartmemtFuncCode, 1);
    /**
     * 科室无随访排班
     */
    public static final String DEPARTMENT_EXCEPTION_TYPE_OUTPATIENT_SCHEDULE_ISNULL = assembleErrCode(fuAppCode,
            fuDepartmemtFuncCode, 2);

    /**
     * 科室不存在
     */
    public static final String DEPARTMENT_EXCEPTION_TYPE_DEPARTMENT_NOT_EXIST = assembleErrCode(fuAppCode,
            fuDepartmemtFuncCode, 3);

    /**
     * 医生信息不存在
     */
    public static final String DEPARTMENT_EXCEPTION_TYPE_DOCTOR_NOT_EXIST = assembleErrCode(fuAppCode, fuDoctorFuncCode,
            1);
    /**
     * 当flag=0时 scheduleID不能为空
     */
    public static final String DEPARTMENT_EXCEPTION_TYPE_SCHEDULEID_NOT_EXIST = assembleErrCode(fuAppCode,
            fuDoctorFuncCode, 2);

    /**
     * 宣教模板不存在
     */
    public static final String DEPARTMENT_EXCEPTION_TYPE_EDUCATION_TEMPLATE_NOT_EXIST = assembleErrCode(fuAppCode,
            fuEducationFuncCode, 1);

    /**
     * 宣教内容不存在
     */
    public static final String DEPARTMENT_EXCEPTION_TYPE_EDUCATION_NOT_EXIST = assembleErrCode(fuAppCode,
            fuEducationFuncCode, 2);
    // -----------------科室管理 end-----------------//

    // 营养方案不存在
    public static final String NUTRITION_EXCEPTION_TYPE_INPUT_DATA_FORMAT_ERROR = assembleErrCode(fuAppCode,
            fuNtSchemeUsedFuncCode, 1);
    // 营养疗程版本不存在
    public static final String FOLLOWUP_EXCEPTION_NUTRITION_COURSEVERSION_NOT_EXISTS_ERROR = assembleErrCode(fuAppCode,
            fuNtSchemeUsedFuncCode, 2);
    // 食物不存在
    public static final String FOLLOWUP_EXCEPTION_NUTRITION_FOOD_NOT_EXISTS_ERROR = assembleErrCode(fuAppCode,
            fuNtSchemeUsedFuncCode, 3);
    // 阶段疗程不存
    public static final String FOLLOWUP_EXCEPTION_NUTRITION_STAGE_COURSE_NOT_EXISTS = assembleErrCode(fuAppCode,
            fuNtSchemeUsedFuncCode, 4);
    // 疗程类型不存
    public static final String FOLLOWUP_EXCEPTION_NUTRITION_COURSETYPE_NOT_EXISTS = assembleErrCode(fuAppCode,
            fuNtSchemeUsedFuncCode, 5);
    // 疗程营养元素不存在
    public static final String FOLLOWUP_EXCEPTION_NUTRITION_ELEMENTS_NOT_EXISTS = assembleErrCode(fuAppCode,
            fuNtSchemeUsedFuncCode, 6);
    // 营养方案阶段不存在
    public static final String FOLLOWUP_EXCEPTION_NUTRITION_STAGE_NOT_EXISTS = assembleErrCode(fuAppCode,
            fuNtSchemeUsedFuncCode, 7);

    // 文件格式不对
    public static final String FOLLOWUP_EXCEPTION_FILE_TYPE_INCORRECT = assembleErrCode(fuAppCode,
            fuNtSchemeUsedFuncCode, 8);
    // 文件内容为空
    public static final String FOLLOWUP_EXCEPTION_FILE_CONTENT_IS_EMPTY = assembleErrCode(fuAppCode,
            fuNtSchemeUsedFuncCode, 9);

    // 该用户已经绑定了用户 []
    public static final String FOLLOWUP_EXCEPTION_DEVICE_HAS_BINDED = assembleErrCode(fuAppCode, fuNtSchemeUsedFuncCode,
            10);

    // 该用户已经绑定其他用户 []
    public static final String FOLLOWUP_EXCEPTION_USER_HAS_BINDED = assembleErrCode(fuAppCode, fuNtSchemeUsedFuncCode,
            11);

    // 获取小米手环权限失败
    public static final String FOLLOWUP_EXCEPTION_HUAMI_GETTOKEN_FAIL = assembleErrCode(fuAppCode,
            fuNtSchemeUsedFuncCode, 12);
    /**
     * 节点显示、隐藏取值异常
     */
    public static final String FOLLOWUP_EXCEPTION_NODE_SHOW_ERROR = assembleErrCode(fuAppCode, fuNtSchemeUsedFuncCode, 13);
    /**
     * 节点不能为空
     */
    public static final String FOLLOWUP_EXCEPTION_NODE_IS_NULL = assembleErrCode(fuScanAppCode, fuNtSchemeUsedFuncCode, 14);
    /**
     * 模板id不能为空
     */
    public static final String FOLLOWUP_EXCEPTION_CONTENT_ID_ISNULL = assembleErrCode(fuScanAppCode, fuNtSchemeUsedFuncCode, 15);
    /**
     * 模板版本不能为空
     */
    public static final String FOLLOWUP_EXCEPTION_CONTENT_VERSION_ISNULL = assembleErrCode(fuScanAppCode, fuNtSchemeUsedFuncCode, 16);
    /**
     * 模板节点不存在
     */
    public static final String EHR_EXCEPTION_CONTENTTEMPL_NODE_NOT_EXIST = assembleErrCode(fuScanAppCode, fuNtSchemeUsedFuncCode, 17);
    // 功能菜单未配置
    public static final String FOLLOWUP_EXCEPTION_MENU_NOT_CONFIG = assembleErrCode(fuScanAppCode, fuScanFuncCode, 1);
    // 主诉、提醒功能菜单 问卷未配置
    public static final String FOLLOWUP_EXCEPTION_MENU_CONFIG_ERROR = assembleErrCode(fuScanAppCode, fuScanFuncCode, 2);

    public static final String EXCEPTION_TEMP_NOT_EXISTS_ERROR = assembleErrCode(fuScanAppCode, fuScanFuncCode, 3);

    public static final String EXCEPTION_TEMP_ERROR = assembleErrCode(fuScanAppCode, fuScanFuncCode, 4);

    public static final String EXCEPTION_REGISTER_NOT_EXISTS = assembleErrCode(fuScanAppCode, fuScanFuncCode, 5);



    // -----------------健康档案 Begin-----------------//
    // 应用
    private static final long ehrAppCode = 600;
    // 数据操作域
    private static final long ehrDataOprFuncCode = 601;
	// 事件模板配置不存在
	public static final String EHR_EXCEPTION_EVENT_INFO_NOT_EXISTS = assembleErrCode(ehrAppCode, ehrDataOprFuncCode, 1);
	// 数据集配置不存在
	public static final String EHR_EXCEPTION_DATASET_INFO_NOT_EXISTS = assembleErrCode(ehrAppCode, ehrDataOprFuncCode,
			2);
	public static final String EHR_EXCEPTION_DECODE_INFO_NOT_EXISTS = assembleErrCode(ehrAppCode, ehrDataOprFuncCode, 3);

	public static final String EHR_EXCEPTION_DEALTYPE_IS_NULL = assembleErrCode(ehrAppCode, ehrDataOprFuncCode, 4);

	public static final String EHR_EXCEPTION_UNION_KEY_INFO_NOT_EXISTS = assembleErrCode(ehrAppCode, ehrDataOprFuncCode, 5);

	/**
	 * 模板不存在 （ehr_contenttempl_dict）
	 */
	public static final String EHR_EXCEPTION_CONTENTTEMPL_NOE_EXIST = assembleErrCode(ehrAppCode, ehrDataOprFuncCode, 6);

	/**
	 * 业务编码不能为空
	 */
	public static final String EHR_EXCEPTION_BUSICODE_ISNULL = assembleErrCode(ehrAppCode, ehrDataOprFuncCode, 7);

	/**
	 * ehr 接口异常
	 */
	public static final String EHR_EXCEPTION_SYSTEM_SERVICE_CALL_EXCP = assembleErrCode(ehrAppCode, ehrDataOprFuncCode, 8);

	/**
	 * 患者ID不能为空
	 */
	public static final String EHR_EXCEPTION_USERID_ISNULL = assembleErrCode(ehrAppCode, ehrDataOprFuncCode, 9);

	/**
	 * 数据元编码不能为空
	 */
	public static final String EHR_EXCEPTION_DECODE_ISNULL = assembleErrCode(ehrAppCode, ehrDataOprFuncCode, 10);
	/**
	 * 节点类型错误
	 */
	public static final String EHR_EXCEPTION_NODE_TYPE_ERROR = assembleErrCode(ehrAppCode, ehrDataOprFuncCode, 11);
	/**
	 * 建档失败
	 */
	public static final String EHR_EXCEPTION_ARCHIVE_FAILURE = assembleErrCode(ehrAppCode, ehrDataOprFuncCode, 12);

	// -----------------健康档案 End-----------------//

    // -----------------临床路径 Begin-----------------//
    // 应用
    private static final long cpAppCode = 700;
    // 临床路径--队列域
    private static final long cpQueueFuncCode = 701;
    // 临床路径--患者实例
    private static final long ptCpInsFuncCode = 702;

    /** 队列下未关联对应临床路径方案 **/
    public static final String CPQUEUE_EXCEPTION_QUEUE_CP_REL_NOT_EXISTS = assembleErrCode(cpAppCode, cpQueueFuncCode,
            1);
    /** 临床路径不存在 **/
    public static final String CPQUEUE_EXCEPTION_CPSCHEME_NOT_EXISTS = assembleErrCode(cpAppCode, cpQueueFuncCode, 2);
    // 临床路径已被删除 **/
    public static final String CPQUEUE_EXCEPTION_CPSCHEME_HAS_REMOVED = assembleErrCode(cpAppCode, cpQueueFuncCode, 3);
    /** 临床路径版本不存在 **/
    public static final String CPQUEUE_EXCEPTION_CPSCHEMEVERSION_NOT_EXISTS = assembleErrCode(cpAppCode,
            cpQueueFuncCode, 4);
    /** 临床路径阶段不存在 **/
    public static final String CPQUEUE_EXCEPTION_CPSCHEME_STAGE_NOT_EXISTS = assembleErrCode(cpAppCode, cpQueueFuncCode,
            5);
    /** 临床路径阶段下节点不存在 **/
    public static final String CPQUEUE_EXCEPTION_CPSCHEME_NODE_NOT_EXISTS = assembleErrCode(cpAppCode, cpQueueFuncCode,
            6);
    /** 临床路径阶段下节点任务不存在 **/
    public static final String CPQUEUE_EXCEPTION_CPNODE_TASK_NOT_EXISTS = assembleErrCode(cpAppCode, cpQueueFuncCode,
            7);
    /** 临床路径阶段下节点任务内容不存在 **/
    public static final String CPQUEUE_EXCEPTION_CPNODE_TASKCONT_NOT_EXISTS = assembleErrCode(cpAppCode,
            cpQueueFuncCode, 8);
    /** 临床路径阶段下节点或任务无写权限 **/
    public static final String CPQUEUE_EXCEPTION_CPNODETASK_ROLE_ONLY_READ = assembleErrCode(cpAppCode, cpQueueFuncCode,
            9);
    /** 临床路径阶段下节点任务角色未配置 **/
    public static final String CPQUEUE_EXCEPTION_CPNODE_TASKAUTH_NOT_EXISTS = assembleErrCode(cpAppCode,
            cpQueueFuncCode, 10);
    /** 临床路径未配置临时随访节点模板 **/
    public static final String CPQUEUE_EXCEPTION_TEMP_NODE_NOT_CONFIG = assembleErrCode(cpAppCode,
            cpQueueFuncCode, 11);

    /** 临床路径阶段下节点任务实例不存在 **/
    public static final String PTCPINS_EXCEPTION_CPTASK_NOT_EXISTS = assembleErrCode(cpAppCode, ptCpInsFuncCode, 1);
    /** 临床路径阶段下节点实例不存在 **/
    public static final String PTCPINS_EXCEPTION_CPNODE_NOT_EXISTS = assembleErrCode(cpAppCode, ptCpInsFuncCode, 2);
    /** 任务内容模板对应实例记录不存在 **/
    public static final String PTCPINS_EXCEPTION_CPTASKCONT_ISNULL = assembleErrCode(cpAppCode, ptCpInsFuncCode, 3);
    /** 任务内容实例记录不存在 **/
    public static final String PTCPINS_EXCEPTION_CPTASKCONT_NOT_EXISTS = assembleErrCode(cpAppCode, ptCpInsFuncCode, 4);
    /** 随访节点实例状态无效 **/
    public static final String PTCPINS_EXCEPTION_CPNODESTATUS_INVALID = assembleErrCode(cpAppCode, ptCpInsFuncCode, 5);
    /** 指定角色下没有该节点实例记录 **/
    public static final String PTCPINS_EXCEPTION_CPNODE_NOT_REF_ROLEID = assembleErrCode(cpAppCode, ptCpInsFuncCode, 6);
    /** 指定角色下没有该节点实例记录 **/
    public static final String PTCPINS_EXCEPTION_ROLE_CPNODESTATUS_INVALID = assembleErrCode(cpAppCode, ptCpInsFuncCode,
            7);
    /** 临床路径计划实例不存在 **/
    public static final String PTCPINS_EXCEPTION_CP_PLAN_NOT_EXISTS = assembleErrCode(cpAppCode, ptCpInsFuncCode, 8);
    /** 治疗计划实例处理状态无效 **/
    public static final String PTCPINS_EXCEPTION_CPPLAN_DEALSTATUS_INVALID = assembleErrCode(cpAppCode, ptCpInsFuncCode,
            9);
    /** 随访节点实例处理状态无效 **/
    public static final String PTCPINS_EXCEPTION_CPNODE_DEALTATUS_INVALID = assembleErrCode(cpAppCode, ptCpInsFuncCode,
            10);
    /** 建档节点实例不能修改窗口期 **/
    public static final String PTCPINS_EXCEPTION_ARCHIVE_NODE_CANNOT_MODIFY_WINDATE = assembleErrCode(cpAppCode,
            ptCpInsFuncCode, 11);
    /** 节点未过期 **/
    public static final String PTCPINS_EXCEPTION_NODE_NOT_EXPIRED = assembleErrCode(cpAppCode, ptCpInsFuncCode, 12);
    /** 消息通知规则类型 不存在 */
    public static final String NOTIFY_FULES_TYPE_NOT_CONFIG = assembleErrCode(cpAppCode, ptCpInsFuncCode, 13);
    /** 当日临时随访节点已存在，请勿重复添加 **/
    public static final String PTCPINS_EXCEPTION_TEMP_CPNODE_HAS_EXISTS = assembleErrCode(cpAppCode, ptCpInsFuncCode, 14);
    /** 当前还存在未开始的随访节点 **/
    public static final String PTCPINS_EXCEPTION_HAS_INIT_CPNODE = assembleErrCode(cpAppCode, ptCpInsFuncCode, 15);

    /** 当前任务不是临时任务 **/
    public static final String PTCPINS_EXCEPTION_HAS_TEMPORARY_TASK = assembleErrCode(cpAppCode, ptCpInsFuncCode, 16);


    /** 孕妇末次月经不能为空  */
    public static final String  LAST_MENSTRUAL_DATA_NOT_EXISTS= assembleErrCode(cpAppCode,
    		ptCpInsFuncCode, 16);

    /** 孕周体重监测 从5周开始  */
    public static final String  PREGNANCY_WEIGHT_WEEK_INVALID = assembleErrCode(cpAppCode,
    		ptCpInsFuncCode, 17);

    /** 孕前bmi 对应的身高体重没有填写  */
    public static final String PREGNANCY_BEFORE_BMI_NOT_EXISTS = assembleErrCode(cpAppCode,
    		ptCpInsFuncCode, 18);
    // -----------------临床路径 End-----------------//

    // -----------------微信Begin-----------------//
    // 微信应用
    private static final int fuWechatAppCode = 600;
    // 微信消息接入
    private static final int fuWechatFuncCode = 601;

    // 二维码信息未配置
    public static final String WECHAT_EXCEPTION_QRCODE_INFO_NOT_EXISTS = assembleErrCode(fuWechatAppCode,
            fuWechatFuncCode, 1);
    // 没有绑定二维码
    public static final String WECHAT_EXCEPTION_QRCODE_INFO_NOT_BIND = assembleErrCode(fuWechatAppCode,
            fuWechatFuncCode, 2);
    // 项目不存在
    public static final String WECHAT_EXCEPTION_PROJECT_NOT_CONFIG = assembleErrCode(fuWechatAppCode, fuWechatFuncCode,
            3);
    // 项目用户端角色不存在
    public static final String WECHAT_EXCEPTION_PROJECT_PATIENTROLE_NOT_CONFIG = assembleErrCode(fuWechatAppCode,
            fuWechatFuncCode, 5);
    // 任务业务类型未定义
    public static final String WECHAT_EXCEPTION_BUSI_TYPE_NOT_CONFIG = assembleErrCode(fuWechatAppCode,
            fuWechatFuncCode, 6);
    // 任务业务类型未定义
    public static final String WECHAT_EXCEPTION_QUEUE_USER_NOT_EXIST = assembleErrCode(fuWechatAppCode,
            fuWechatFuncCode, 7);
    // 微信信息未配置
    public static final String WECHAT_EXCEPTION_WECHAT_INFO_NOT_EXISTS = assembleErrCode(fuWechatAppCode,
            fuWechatFuncCode, 8);
    /** 用户还未绑定微信 */
    public static final String WECHAT_EXCEPTION_NOT_BIIND_OPENID = assembleErrCode(fuWechatAppCode, fuWechatFuncCode,
            9);

    /** 记录不存在 */
    public static final String WECHAT_EXCEPTION_RECORD_NOT_EXISTS = assembleErrCode(fuWechatAppCode, fuWechatFuncCode,
            10);

    /** 微信还未绑定或建立用户 */
    public static final String WECHAT_EXCEPTION_NOT_BIIND_USER = assembleErrCode(fuWechatAppCode, fuWechatFuncCode, 11);

    /** 微信消息模板未配置 */
    public static final String WECHAT_EXCEPTION_MSG_TEMPLATE_NOT_EXISTS = assembleErrCode(fuWechatAppCode,
            fuWechatFuncCode, 12);

    /** 小程序建档失败 */
    public static final String SMALL_PROGRAM_EXCEPTION_ARCHIVE_FAILURE = assembleErrCode(fuWechatAppCode,
            fuWechatFuncCode, 13);

    /** 小程序预约失败 */
    public static final String SMALL_PROGRAM_APPONITMENT_FAILURE = assembleErrCode(fuWechatAppCode,
            fuWechatFuncCode, 14);

    /** 小程序预约失败 */
    public static final String SMALL_PROGRAM_SCALEPUSH_FAILURE = assembleErrCode(fuWechatAppCode,
            fuWechatFuncCode, 15);

    // -----------------微信end-----------------//

    /*-------------------------- 血液科 begin ------------------------------- */

    // 应用编号：800
    private static final long distreatAppCode = 800;
    // 公共错误域：800
    private static final long distreatPubFuncCode = 800;
    // 药品域：801
    private static final long distreatMedicineFuncCode = 801;
    // 疗程域：802
    private static final long distreatCourseFuncCode = 802;
    // 方案域：803
    private static final long distreatSchemeFuncCode = 803;
    // 疾病：804
    private static final long distreatDiseaseFunCode = 804;
    // 机构：805
    private static final long distreatMedicalinstFunCode = 805;
    // 阶段：806
    private static final long distreatStageFunCode = 806;
    // 治疗计划：807
    private static final long distreatPlanFunCode = 807;

    // 公共域错误
    /**
     * 入参格式错误，如非json格式，Integer传String等
     */
    public static final String DISTREAT_EXCEPTION_TYPE_INPUT_DATA_FORMAT_ERROR = assembleErrCode(distreatAppCode,
            distreatPubFuncCode, 1);
    /**
     * 入参数据校验失败，如参数未传、值为空等
     */
    public static final String DISTREAT_EXCEPTION_TYPE_INPUT_DATA_VERIFY_ERROR = assembleErrCode(distreatAppCode,
            distreatPubFuncCode, 2);
    /**
     * 图片上传失败，上传文件为空
     */
    public static final String DISTREAT_EXCEPTION_TYPE_UPLOAD_FILE_MPTY = assembleErrCode(distreatAppCode,
            distreatPubFuncCode, 3);
    /**
     * 日期时间格式解析错误
     */
    public static final String DISTREAT_EXCEPTION_TYPE_DATE_PARSE_ERROR = assembleErrCode(distreatAppCode,
            distreatPubFuncCode, 4);
    /**
     * session为空
     */
    public static final String DISTREAT_EXCEPTION_TYPE_SESSION_ISNULL = assembleErrCode(distreatAppCode,
            distreatPubFuncCode, 5);
    /**
     * session值为空
     */
    public static final String DISTREAT_EXCEPTION_TYPE_SESSION_VALUEISNULL = assembleErrCode(distreatAppCode,
            distreatPubFuncCode, 6);
    /**
     * 出生日期大于当前时间
     */
    public static final String DISTREAT_EXCEPTION_TYPE_BIRTHDAY_EXPEND_NOW = assembleErrCode(distreatAppCode,
            distreatPubFuncCode, 7);
    /**
     * 租户类型未定义
     */
    public static final String DISTREAT_EXCEPTION_TYPE_TENANT_TYPE_UNKNOWN = assembleErrCode(distreatAppCode,
            distreatPubFuncCode, 8);
    /**
     * 公共校验 app端接入 没有传入渠道id
     */
    public static final String DISTREAT_EXCEPTION_TYPE_INPUT_CHANNEL_IS_NULL = assembleErrCode(distreatAppCode,
            distreatPubFuncCode, 9);
    /**
     * 调用外部接口服务异常
     */
    public static final String DISTREAT_TYPE_SYSTEM_SERVICE_CALL_EXCP = assembleErrCode(distreatAppCode,
            distreatPubFuncCode, 10);

    // 方案域
    public static final String DISTREAT_EXCEPTION_TYPE_SCHEME_ALREADY_DELETE = assembleErrCode(distreatAppCode,
            distreatSchemeFuncCode, 1);
    public static final String DISTREAT_EXCEPTION_TYPE_SCHEMECLASS_NOT_EXIST = assembleErrCode(distreatAppCode,
            distreatSchemeFuncCode, 2);
    public static final String DISTREAT_EXCEPTION_TYPE_SCHEME_NOT_EXIST = assembleErrCode(distreatAppCode,
            distreatSchemeFuncCode, 3);
    /**
     * 方案草稿状态，还未发布
     */
    public static final String DISTREAT_EXCEPTION_TYPE_SCHEME_NOT_PUBLISH = assembleErrCode(distreatAppCode,
            distreatSchemeFuncCode, 4);
    /**
     * 治疗方案对应版本记录不存在
     */
    public static final String DISTREAT_EXCEPTION_TYPE_SCHEMEVERSION_NOT_EXIST = assembleErrCode(distreatAppCode,
            distreatSchemeFuncCode, 5);
    /**
     * 方案已发布
     */
    public static final String DISTREAT_EXCEPTION_TYPE_SCHEME_HAS_ALREADY_PUBLISH = assembleErrCode(distreatAppCode,
            distreatSchemeFuncCode, 6);
    /**
     * 方案状态异常
     */
    public static final String DISTREAT_EXCEPTION_TYPE_SCHEME_STATUS_INVALID = assembleErrCode(distreatAppCode,
            distreatSchemeFuncCode, 7);
    /**
     * 方案版本异常
     */
    public static final String DISTREAT_EXCEPTION_TYPE_SCHEME_VERSION_INVALID = assembleErrCode(distreatAppCode,
            distreatSchemeFuncCode, 8);

    // 药品
    public static final String DISTREAT_EXCEPTION_TYPE_MEDICINE_ALREADY_EXIST = assembleErrCode(distreatAppCode,
            distreatMedicineFuncCode, 1);
    public static final String DISTREAT_EXCEPTION_TYPE_MEDICINECLASS_NOT_EXIST = assembleErrCode(distreatAppCode,
            distreatMedicineFuncCode, 2);
    public static final String DISTREAT_EXCEPTION_TYPE_MEDCATALOG_NOT_EXIST = assembleErrCode(distreatAppCode,
            distreatMedicineFuncCode, 3);
    public static final String DISTREAT_EXCEPTION_TYPE_MEDICINE_NOT_EXIST = assembleErrCode(distreatAppCode,
            distreatMedicineFuncCode, 4);
    public static final String DISTREAT_EXCEPTION_TYPE_MEDUNICTDICT_NOT_EXIST = assembleErrCode(distreatAppCode,
            distreatMedicineFuncCode, 5);
    /**
     * 药品目录已被删除
     */
    public static final String DISTREAT_EXCEPTION_TYPE_MEDCATALOG_HAS_REMOVED = assembleErrCode(distreatAppCode,
            distreatMedicineFuncCode, 6);
    /**
     * 药品已被疗程应用
     */
    public static final String DISTREAT_EXCEPTION_TYPE_MEDICINE_COURSE_HAS_APPLIED = assembleErrCode(distreatAppCode,
            distreatMedicineFuncCode, 7);
    /**
     * 药品目录已存在
     */
    public static final String DISTREAT_EXCEPTION_TYPE_MEDCATALOG_ALREADY_EXIST = assembleErrCode(distreatAppCode,
            distreatMedicineFuncCode, 8);

    // 疾病库
    public static final String DISTREAT_EXCEPTION_TYPE_DISEASELIB_NOT_EXIST = assembleErrCode(distreatAppCode,
            distreatDiseaseFunCode, 1);
    public static final String DISTREAT_EXCEPTION_TYPE_DISEASECATALOG_NOT_EXIST = assembleErrCode(distreatAppCode,
            distreatDiseaseFunCode, 2);
    public static final String DISTREAT_EXCEPTION_TYPE_DISEASE_NOT_EXIST = assembleErrCode(distreatAppCode,
            distreatDiseaseFunCode, 3);

    // 疗程
    public static final String DISTREAT_EXCEPTION_TYPE_COURSELIB_NOT_EXIST = assembleErrCode(distreatAppCode,
            distreatCourseFuncCode, 1);
    public static final String DISTREAT_EXCEPTION_TYPE_PTDISCOURSE_NOT_EXIST = assembleErrCode(distreatAppCode,
            distreatCourseFuncCode, 2);
    public static final String DISTREAT_EXCEPTION_TYPE_COURSE_SEQNO_INVALIDA = assembleErrCode(distreatAppCode,
            distreatCourseFuncCode, 3);
    public static final String DISTREAT_EXCEPTION_TYPE_PTCOURSE_SEQNO_INVALIDA = assembleErrCode(distreatAppCode,
            distreatCourseFuncCode, 4);
    /**
     * 疗程实例无效
     */
    public static final String DISTREAT_EXCEPTION_TYPE_PTDISCOURSE_INVALID = assembleErrCode(distreatAppCode,
            distreatCourseFuncCode, 5);
    /**
     * 疗程天数序号已存在
     */
    public static final String DISTREAT_EXCEPTION_TYPE_COURSE_SEQDAY_ALREADY_EXIST = assembleErrCode(distreatAppCode,
            distreatCourseFuncCode, 6);
    /**
     * 疗程已过期（即截止日期小于今天）
     */
    public static final String DISTREAT_EXCEPTION_TYPE_PTDISCOURSE_HAS_EXPIRED = assembleErrCode(distreatAppCode,
            distreatCourseFuncCode, 7);
    /**
     * 疗程未设置起始日期
     */
    public static final String DISTREAT_EXCEPTION_TYPE_PTDISCOURSE_NOTSET_STARTDATE = assembleErrCode(distreatAppCode,
            distreatCourseFuncCode, 8);

    // 机构
    public static final String DISTREAT_EXCEPTION_TYPE_MEDICALINST_NOT_EXIST = assembleErrCode(distreatAppCode,
            distreatMedicalinstFunCode, 1);

    // 阶段
    public static final String DISTREAT_EXCEPTION_TYPE_STAGE_NOT_EXIST = assembleErrCode(distreatAppCode,
            distreatStageFunCode, 1);
    public static final String DISTREAT_EXCEPTION_TYPE_PTSTAGE_SEQNO_INVALIDA = assembleErrCode(distreatAppCode,
            distreatStageFunCode, 2);
    public static final String DISTREAT_EXCEPTION_TYPE_PTDISSTAGE_NOT_EXIST = assembleErrCode(distreatAppCode,
            distreatStageFunCode, 3);

    // 治疗计划
    public static final String DISTREAT_EXCEPTION_TYPE_PLAN_NOT_EXIST = assembleErrCode(distreatAppCode,
            distreatPlanFunCode, 1);
    public static final String DISTREAT_EXCEPTION_TYPE_PTDISPLAN_NOT_EXIST = assembleErrCode(distreatAppCode,
            distreatStageFunCode, 2);
    /**
     * 患者还有未完成的治疗计划
     */
    public static final String DISTREAT_EXCEPTION_TYPE_USER_HAS_UNFINISHED_PLAN = assembleErrCode(distreatAppCode,
            distreatStageFunCode, 3);
    /**
     * 患者治疗计划状态异常
     */
    public static final String DISTREAT_EXCEPTION_TYPE_PT_PLANSTATUS_INVALID = assembleErrCode(distreatAppCode,
            distreatStageFunCode, 4);

    /*-------------------------- 血液科 end ------------------------------- */

}
